package main

import "fmt"

type IPhone struct{}
type NokiaPhone struct{}
type Square struct {
	side float32
}

type Phone interface {
	call()
}

type Shaper interface {
	Area() float32
}

func (iphone IPhone) call() {
	fmt.Println("iphone call you")
}

func (nokiaPhone NokiaPhone) call() {
	fmt.Println("nokiaPhone call you")
}

func (square Square) Area() float32 {
	return square.side * square.side
}

func main() {

	var phone Phone = new(IPhone)
	phone.call()

	phone = new(NokiaPhone)
	phone.call()

	var square1 = new(Square)
	square1.side = 5
	var square2 = Shaper(square1)
	fmt.Printf("The square has area: %f\n", square2.Area())

}
